﻿using DataModels.Dto;
using DataModels.Dto.BIll;
using DataModels.Entities.Bill;
using Microsoft.AspNetCore.Mvc;
using Services.Bill;

namespace PropertyManagementWebApi.Controllers.Bill
{
    public class BillController(BillService billService) :BaseController
    {
        protected readonly BillService _billService = billService;

        /// <summary>
        /// 获取账单
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [HttpGet]
        public ResponseModel GetBillInfo(GetBillInfo info)
        {
            return _billService.GetBillInfo(info);
        }

        /// <summary>
        /// 新增账单
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [HttpPost]
        public ResponseModel AddBill(BillMain info)
        {
            return _billService.AddBill(info);
        }
    }
}
